gtk4.git
5 years agoMerge branch 'fix-inspector-popover' into 'master'
Matthias Clasen [Wed, 6 May 2020 12:55:18 +0000 (12:55 +0000)]
Merge branch 'fix-inspector-popover' into 'master'

inspector: Fix css tree popovers

See merge request GNOME/gtk!1838

5 years agoMerge branch 'wip/baedert/for-master' into 'master'
Matthias Clasen [Wed, 6 May 2020 03:55:55 +0000 (03:55 +0000)]
Merge branch 'wip/baedert/for-master' into 'master'

Wip/baedert/for master

See merge request GNOME/gtk!1828

5 years agoinspector: Fix css tree popovers
Matthias Clasen [Wed, 6 May 2020 03:51:37 +0000 (23:51 -0400)]
inspector: Fix css tree popovers

Adding popovers to a treeview doesn't work. Instead,
attach them to the cssnodetree widget, which is using
a layout manager - popovers work in that case.

5 years agoMerge branch 'abolish-destroy' into 'master'
Matthias Clasen [Wed, 6 May 2020 00:37:04 +0000 (00:37 +0000)]
Merge branch 'abolish-destroy' into 'master'

Abolish destroy

See merge request GNOME/gtk!1835

5 years agowidget: Drop the destroy vfunc
Matthias Clasen [Tue, 5 May 2020 20:59:31 +0000 (16:59 -0400)]
widget: Drop the destroy vfunc

We still emit the ::destroy signal, but if you
want a vfunc, use dispose.

5 years agogtk-demo: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:57:28 +0000 (16:57 -0400)]
gtk-demo: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agocontainer: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:52:02 +0000 (16:52 -0400)]
container: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agoplacesview: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:51:43 +0000 (16:51 -0400)]
placesview: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agoprintunixdialog: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:51:33 +0000 (16:51 -0400)]
printunixdialog: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agowindow: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:51:24 +0000 (16:51 -0400)]
window: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agotreeview: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:51:16 +0000 (16:51 -0400)]
treeview: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agotextview: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:50:59 +0000 (16:50 -0400)]
textview: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agostatusbar: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:50:49 +0000 (16:50 -0400)]
statusbar: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agonotebook: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:50:33 +0000 (16:50 -0400)]
notebook: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agoiconview: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:50:21 +0000 (16:50 -0400)]
iconview: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agoshortcutssection: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:50:07 +0000 (16:50 -0400)]
shortcutssection: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agoradiobutton: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:49:48 +0000 (16:49 -0400)]
radiobutton: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agorange: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:49:33 +0000 (16:49 -0400)]
range: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agospinbutton: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:49:20 +0000 (16:49 -0400)]
spinbutton: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agoviewport: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:49:08 +0000 (16:49 -0400)]
viewport: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agotext: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:48:59 +0000 (16:48 -0400)]
text: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agomodelbutton: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:48:39 +0000 (16:48 -0400)]
modelbutton: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agolabel: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:48:23 +0000 (16:48 -0400)]
label: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agofilechooserbutton: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:48:11 +0000 (16:48 -0400)]
filechooserbutton: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agoexpander: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:47:36 +0000 (16:47 -0400)]
expander: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agocombobox: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 20:47:10 +0000 (16:47 -0400)]
combobox: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agoactionbar: Use dispose instead of destroy
Matthias Clasen [Tue, 5 May 2020 19:49:30 +0000 (15:49 -0400)]
actionbar: Use dispose instead of destroy

The destroy vfunc is going away.

5 years agoMerge branch 'misc-cleanups' into 'master'
Matthias Clasen [Tue, 5 May 2020 21:02:25 +0000 (21:02 +0000)]
Merge branch 'misc-cleanups' into 'master'

Misc cleanups

See merge request GNOME/gtk!1832

5 years agoMerge branch 'wip/exalm/controls-dispose' into 'master'
Matthias Clasen [Tue, 5 May 2020 18:19:00 +0000 (18:19 +0000)]
Merge branch 'wip/exalm/controls-dispose' into 'master'

windowcontrols: Unparent children in dispose rather than finalize

See merge request GNOME/gtk!1831

5 years agowidget-factory: Use symboli icons in the toolbar
Matthias Clasen [Tue, 5 May 2020 14:44:50 +0000 (10:44 -0400)]
widget-factory: Use symboli icons in the toolbar

That is the style that is commonly used nowadays, even
in traditional apps.

5 years agowidget-factory: Remove unused css
Matthias Clasen [Tue, 5 May 2020 14:42:13 +0000 (10:42 -0400)]
widget-factory: Remove unused css

We no longer show the various frame styles.

5 years agowindow: Lower the visible focus timeout
Matthias Clasen [Tue, 5 May 2020 14:37:10 +0000 (10:37 -0400)]
window: Lower the visible focus timeout

Five seconds felt too long for some people in
initial feedback, so lets lower the timeout to
3 seconds.

5 years agoassistant: Drop the Private struct
Matthias Clasen [Tue, 5 May 2020 01:36:00 +0000 (21:36 -0400)]
assistant: Drop the Private struct

5 years agoplacesview: Drop the Private struct
Matthias Clasen [Tue, 5 May 2020 00:42:09 +0000 (20:42 -0400)]
placesview: Drop the Private struct

5 years agosearchbar: Drop the Private struct
Matthias Clasen [Tue, 5 May 2020 00:09:29 +0000 (20:09 -0400)]
searchbar: Drop the Private struct

5 years agowindowcontrols: Unparent children in dispose rather than finalize
Alexander Mikhaylenko [Tue, 5 May 2020 14:43:55 +0000 (19:43 +0500)]
windowcontrols: Unparent children in dispose rather than finalize

5 years agoMerge branch 'wip/jimmac/notebook-tab-focus' into 'master'
Jakub Steiner [Tue, 5 May 2020 13:42:25 +0000 (13:42 +0000)]
Merge branch 'wip/jimmac/notebook-tab-focus' into 'master'

Adwaita: notebook tab focus ring

See merge request GNOME/gtk!1830

5 years agoMerge branch 'bin-removal' into 'master'
Matthias Clasen [Tue, 5 May 2020 12:55:50 +0000 (12:55 +0000)]
Merge branch 'bin-removal' into 'master'

Bin removal

See merge request GNOME/gtk!1820

5 years agoAdwaita: notebook tab focus ring
Jakub Steiner [Tue, 5 May 2020 11:57:33 +0000 (13:57 +0200)]
Adwaita: notebook tab focus ring

- prelight the tab, not a label (visually)

5 years agoMerge branch 'wip/jimmac/oldstyle-toolbars' into 'master'
Jakub Steiner [Tue, 5 May 2020 09:53:05 +0000 (09:53 +0000)]
Merge branch 'wip/jimmac/oldstyle-toolbars' into 'master'

Adwaita: old style toolbar buttons

See merge request GNOME/gtk!1829

5 years agoAdwaita: old style toolbar buttons
Jakub Steiner [Tue, 5 May 2020 08:55:14 +0000 (10:55 +0200)]
Adwaita: old style toolbar buttons

- style toolbar buttons

5 years agoshortcutcontroller: Check for NULL GtkNative of widget
Timm Bäder [Thu, 30 Apr 2020 09:03:14 +0000 (11:03 +0200)]
shortcutcontroller: Check for NULL GtkNative of widget

And just continue in that case.

5 years agolabel: Be more defensive against non-existant focus_link
Timm Bäder [Thu, 30 Apr 2020 08:03:11 +0000 (10:03 +0200)]
label: Be more defensive against non-existant focus_link

5 years agosurface: remove double assignment
Timm Bäder [Thu, 30 Apr 2020 08:03:00 +0000 (10:03 +0200)]
surface: remove double assignment

5 years agoshortcutmanager: Speed up default_remove_controller a bit
Timm Bäder [Thu, 30 Apr 2020 07:08:48 +0000 (09:08 +0200)]
shortcutmanager: Speed up default_remove_controller a bit

Only call get_n_items on the model once and remove two unnecessary
casts.

5 years agoshortcutcontroller: Use a GArray instead of a linked list
Timm Bäder [Wed, 29 Apr 2020 14:39:22 +0000 (16:39 +0200)]
shortcutcontroller: Use a GArray instead of a linked list

5 years agocssprovider: Pass a GtkArray around when matching
Timm Bäder [Wed, 29 Apr 2020 08:46:53 +0000 (10:46 +0200)]
cssprovider: Pass a GtkArray around when matching

We just use the resulting GPtrArray to set the values on a GtkCssLookup
and it had mostly a size of 1, in extremes a size of 11.

5 years agogtk.supp: Update
Timm Bäder [Wed, 29 Apr 2020 08:01:53 +0000 (10:01 +0200)]
gtk.supp: Update

Make some rules more general and add some more epoxy/mesa suppressions.

5 years agocssselector: Use a GtkArray to count exact matches
Timm Bäder [Wed, 29 Apr 2020 08:01:25 +0000 (10:01 +0200)]
cssselector: Use a GtkArray to count exact matches

The list here is at most 3 elements long in my tests.

5 years agoadd GtkArray
Timm Bäder [Wed, 29 Apr 2020 07:28:17 +0000 (09:28 +0200)]
add GtkArray

Try to use stack space if we can and only fall back to the GPtrArray if
we must.

5 years agomain: Save some type checks
Timm Bäder [Wed, 29 Apr 2020 06:15:23 +0000 (08:15 +0200)]
main: Save some type checks

We already have the typecheck-less versions of get_realized(),
get_parent() and is_sensitive() in gtkwidgetprivate.h, so use them here.

5 years agoeventcontroller: Remove some unnecessary casts
Timm Bäder [Wed, 29 Apr 2020 06:11:07 +0000 (08:11 +0200)]
eventcontroller: Remove some unnecessary casts

Instead of comparing two GtkWidget*s by casting the two GtkNative*s, we
can as well compare two GtkNative*s. Also if gtk_widget_get_native()
returns NULL, the code previously failed.

5 years agowidget: Use an unchecked cast in _get_native()
Timm Bäder [Wed, 29 Apr 2020 06:07:45 +0000 (08:07 +0200)]
widget: Use an unchecked cast in _get_native()

This is either no chagne because we know for a fact that the returned
value is a GtkNative - after all thats's the type we pass to
gtk_widget_get_ancestor().

Or it is a bug fix since casting NULL to a GtkNative using GTK_NATIVE()
is not going to work, but the API contract of gtk_widget_get_native()
explicitly allows a NULL return value.

5 years agowindow: Remove unused private function
Timm Bäder [Tue, 28 Apr 2020 15:54:51 +0000 (17:54 +0200)]
window: Remove unused private function

5 years agoscalebutton: Shorten finalize() implementation
Timm Bäder [Mon, 27 Apr 2020 09:56:55 +0000 (11:56 +0200)]
scalebutton: Shorten finalize() implementation

5 years agoscalebutton: Remove unused click_id member
Timm Bäder [Mon, 27 Apr 2020 09:55:00 +0000 (11:55 +0200)]
scalebutton: Remove unused click_id member

5 years agowidget: Save controllers list in a GPtrArray
Timm Bäder [Sun, 26 Apr 2020 17:45:34 +0000 (19:45 +0200)]
widget: Save controllers list in a GPtrArray

5 years agowidget: Only do a IS_ROOT type check if the parent is unset
Timm Bäder [Sun, 26 Apr 2020 15:34:32 +0000 (17:34 +0200)]
widget: Only do a IS_ROOT type check if the parent is unset

So we do less type checks

5 years agoplacesview: Remove frame
Timm Bäder [Sun, 26 Apr 2020 15:32:33 +0000 (17:32 +0200)]
placesview: Remove frame

We don't need a double border here.

5 years agocssselector: Avoid some GList allocations
Timm Bäder [Sat, 25 Apr 2020 19:08:13 +0000 (21:08 +0200)]
cssselector: Avoid some GList allocations

5 years agoicontheme: Save dir_mtimes in a GArray, not a GList
Timm Bäder [Sat, 25 Apr 2020 18:18:29 +0000 (20:18 +0200)]
icontheme: Save dir_mtimes in a GArray, not a GList

5 years agoGdkEvent: Save history in a GArray
Timm Bäder [Sat, 25 Apr 2020 15:50:11 +0000 (17:50 +0200)]
GdkEvent: Save history in a GArray

Instead of a less efficient GList.

5 years agostylecontext: Remove _list_classes() from public API
Timm Bäder [Sat, 25 Apr 2020 14:42:30 +0000 (16:42 +0200)]
stylecontext: Remove _list_classes() from public API

Applications can use gtk_widget_get_css_classes these days.

5 years agotextchild: Return an array from get_widgets
Timm Bäder [Sat, 25 Apr 2020 13:42:24 +0000 (15:42 +0200)]
textchild: Return an array from get_widgets

Yay, one GList less.

5 years agogdkdisplay-wayland: Fix a possibly uninitialized out value
Timm Bäder [Mon, 20 Apr 2020 17:44:14 +0000 (19:44 +0200)]
gdkdisplay-wayland: Fix a possibly uninitialized out value

5 years agowidget: Use early-out style in gtk_widget_realize()
Timm Bäder [Sun, 19 Apr 2020 17:45:07 +0000 (19:45 +0200)]
widget: Use early-out style in gtk_widget_realize()

This is much more common in the current code base and reduces the
indentation level by one.

5 years agoshorthandproperty: Use alloca() when parsing properties
Timm Bäder [Sat, 18 Apr 2020 16:17:46 +0000 (18:17 +0200)]
shorthandproperty: Use alloca() when parsing properties

5 years agoshorthandproperty: Return unset/initial/inherit as-is
Timm Bäder [Sat, 18 Apr 2020 08:55:15 +0000 (10:55 +0200)]
shorthandproperty: Return unset/initial/inherit as-is

We don't even need an array value these days.

5 years agoshorthandproperty: Use alloc a for data array
Timm Bäder [Sat, 18 Apr 2020 08:54:44 +0000 (10:54 +0200)]
shorthandproperty: Use alloc a for data array

5 years agopopover: Remove an unused gtk_widget_get_allocation() call
Timm Bäder [Sat, 18 Apr 2020 05:01:27 +0000 (07:01 +0200)]
popover: Remove an unused gtk_widget_get_allocation() call

5 years agolabel: Remove a debug leftover
Timm Bäder [Fri, 17 Apr 2020 19:28:02 +0000 (21:28 +0200)]
label: Remove a debug leftover

5 years agogskpango: Make get_color a bit shorter
Timm Bäder [Fri, 17 Apr 2020 15:16:05 +0000 (17:16 +0200)]
gskpango: Make get_color a bit shorter

Don't copy from crenderer->fg_color just to override from the local
color again.

5 years agolabel: Unref style_attrs list
Timm Bäder [Fri, 17 Apr 2020 15:08:04 +0000 (17:08 +0200)]
label: Unref style_attrs list

5 years agodocs: Fixup for an uninitialized variable
Matthias Clasen [Mon, 4 May 2020 21:06:30 +0000 (17:06 -0400)]
docs: Fixup for an uninitialized variable

5 years agotestsuite: Update a testcase
Matthias Clasen [Mon, 4 May 2020 18:59:26 +0000 (14:59 -0400)]
testsuite: Update a testcase

Our testcase for flipping icons used media icons which
were recently changed to not do rtl flipping anymore.

5 years agoDrop GtkBin
Matthias Clasen [Sun, 3 May 2020 23:32:13 +0000 (19:32 -0400)]
Drop GtkBin

It is no longer used anywhere.

5 years agotesttooltips: Derive demo from GtkWidget
Matthias Clasen [Mon, 4 May 2020 00:20:08 +0000 (20:20 -0400)]
testtooltips: Derive demo from GtkWidget

5 years agoinspector: Derive recorder from GtkWidget
Matthias Clasen [Sun, 3 May 2020 23:31:11 +0000 (19:31 -0400)]
inspector: Derive recorder from GtkWidget

5 years agogtk-demo: Port blur demo from GtkBin
Matthias Clasen [Sun, 3 May 2020 20:32:33 +0000 (16:32 -0400)]
gtk-demo: Port blur demo from GtkBin

5 years agoAdd a test for bin child conversion
Matthias Clasen [Fri, 1 May 2020 22:06:57 +0000 (18:06 -0400)]
Add a test for bin child conversion

5 years agobuilder-tool: Convert former bin children
Matthias Clasen [Fri, 1 May 2020 22:02:46 +0000 (18:02 -0400)]
builder-tool: Convert former bin children

Convert from <child> elements to <property name="child">
for former GtkBin subclasses. Update test results
to match.

5 years agotooltipwindow: Derive from GtkWidget
Matthias Clasen [Sun, 3 May 2020 20:36:22 +0000 (16:36 -0400)]
tooltipwindow: Derive from GtkWidget

5 years agocombobox: Derive from GtkWidget
Matthias Clasen [Sun, 3 May 2020 17:12:21 +0000 (13:12 -0400)]
combobox: Derive from GtkWidget

We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.

See #2681

5 years agoUse gtk_combo_box_set_child throughout
Matthias Clasen [Sun, 3 May 2020 16:19:17 +0000 (12:19 -0400)]
Use gtk_combo_box_set_child throughout

5 years agocombobox: Add a child property
Matthias Clasen [Sun, 3 May 2020 16:04:23 +0000 (12:04 -0400)]
combobox: Add a child property

5 years agotestkineticscrolling: Make this work again
Matthias Clasen [Sun, 3 May 2020 15:51:12 +0000 (11:51 -0400)]
testkineticscrolling: Make this work again

There was an errant g_free here, and lots of
redundant gtk_widget_show.

5 years agotestgtk: Fix g_object_new use
Matthias Clasen [Sun, 3 May 2020 15:15:40 +0000 (11:15 -0400)]
testgtk: Fix g_object_new use

This is the kind of thing that happens with varargs apis.

5 years agoAdd gtk_overlay_remove_overlay
Matthias Clasen [Sun, 3 May 2020 14:51:49 +0000 (10:51 -0400)]
Add gtk_overlay_remove_overlay

Now that GtkOverlay is not a container anymore,
gtk_container_remove can't be used for this anymore,
so add a separate api.

5 years agooverlay: Derive from GtkWidget
Matthias Clasen [Sun, 3 May 2020 14:50:56 +0000 (10:50 -0400)]
overlay: Derive from GtkWidget

We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.

See #2681

5 years agoUse gtk_overlay_set_child throughout
Matthias Clasen [Sun, 3 May 2020 14:32:24 +0000 (10:32 -0400)]
Use gtk_overlay_set_child throughout

Replace all uses of gtk_container_add on overlays
by gtk_overlay_set_child.

5 years agooverlay: Add a child property
Matthias Clasen [Sun, 3 May 2020 14:31:09 +0000 (10:31 -0400)]
overlay: Add a child property

5 years agosearchbar: Derive from GtkWidget
Matthias Clasen [Sun, 3 May 2020 13:56:40 +0000 (09:56 -0400)]
searchbar: Derive from GtkWidget

We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.

We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for search bars.

See #2681

5 years agoUse gtk_search_bar_set_child throughout
Matthias Clasen [Sun, 3 May 2020 13:58:27 +0000 (09:58 -0400)]
Use gtk_search_bar_set_child throughout

5 years agosearchbar: Add a child property
Matthias Clasen [Sun, 3 May 2020 13:51:09 +0000 (09:51 -0400)]
searchbar: Add a child property

5 years agolistboxrow: Derive from GtkWidget
Matthias Clasen [Sun, 3 May 2020 04:09:18 +0000 (00:09 -0400)]
listboxrow: Derive from GtkWidget

We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.

See #2681

5 years agoflowboxchild: Derive from GtkWidget
Matthias Clasen [Sun, 3 May 2020 00:53:40 +0000 (20:53 -0400)]
flowboxchild: Derive from GtkWidget

We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.

See #2681

5 years agorevealer: Derive from GtkWidget
Matthias Clasen [Sat, 2 May 2020 22:56:57 +0000 (18:56 -0400)]
revealer: Derive from GtkWidget

We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.

See #2681

5 years agoUse gtk_revealer_set_child throughout
Matthias Clasen [Sat, 2 May 2020 21:02:42 +0000 (17:02 -0400)]
Use gtk_revealer_set_child throughout

Replace all uses of gtk_container_add on revealers
with gtk_revealer_set_child.

5 years agorevealer: Add a child property
Matthias Clasen [Sat, 2 May 2020 20:50:11 +0000 (16:50 -0400)]
revealer: Add a child property

5 years agowindow: Derive from GtkWidget
Matthias Clasen [Sat, 2 May 2020 19:17:20 +0000 (15:17 -0400)]
window: Derive from GtkWidget

We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.

Update the accessible implementation to match, remove
remnants of container implementations in GtkWindow
subclasses, and fix livecycle issues around destroy
vs dispose in GtkAssistant.

After this commit, using gtk_container_add on window
subclasses is not allowed anymore, but adding childing
with <child> in ui files still works.

See #2681